<!doctype html>
<html><!-- InstanceBegin template="/Templates/template1.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<!-- InstanceBeginEditable name="doctitle" -->
<title>获奖名单</title>
<script type="text/javascript"> 
$(function(){
	//获取URL 中的shopId
	_shopId=getShopId();
	//获取URL 中的openId
	_openId=getOpenId();
	_swpId= getIdByName("swpId");
	loadWinnerDetail(_swpId);
	var date = new Date();
	$("#date").html("("+ date.getFullYear()+"."+(date.getMonth()+1)+"."+date.getDate()+")");
})
function loadWinnerDetail(swpID){
	loadWinner(swpID,1)
	loadWinner(swpID,2)
	loadWinner(swpID,3)
	
}

function loadWinner(swpID,prizeLevelID){
	$.get('../winner/find/winnerList/swptaksId/'+swpID+'/prizeLevelId/'+prizeLevelID,function(message){
		if(IsEmpty(message)){
			alert('没有查询到数据！');
			return;
		}
		if(message.state=== 0){
			printDataToPage(message,prizeLevelID);
		}
		else{
			alert(message.msg);
		}
	},'json');
}

function printDataToPage(message,prizeLevelID){
	$("#prizeLevel"+prizeLevelID).empty();
	if(message.result.data.length==0){
		$("#prizeLevel"+prizeLevelID).hide();
	}
	for ( var i = 0; i < message.result.data.length; i++) {	
	var htm= "<li>" +getReplaceStr(getHtmlString(getHeadIndexValue(i, message, "Mp")), 3, 7, "****")+"</li>" ;
	$("#prizeLevel"+prizeLevelID).append(htm);
	}
	
}
</script>
</head>

<body>
<div id="container">
  <!-- InstanceBeginEditable name="EditRegion3" -->
  <div class="wrapper" id="box1">
  	<div class="rewardList">
  	<h3 class="title">5100“微信大乐透“中奖名单<span class="date" id="date">（2014.02.17）</span></h3>
    <div class="rewardName">
    <h3>一等奖获得者</h3>
	<ul id="prizeLevel1">
  	
    </ul>
    <h3>二等奖获得者</h3>
	<ul  id="prizeLevel2">
 
    </ul>
    <h3>三等奖获得者</h3>
	<ul  id="prizeLevel3">
  
    </ul>
    </div>
    </div>
  	<div class="rewardList">
    </div>
  </div>
  <!-- InstanceEndEditable -->
  <div class="footer">Copyright 2011 Tibet 5100 Water Resources Holdings Ltd. All right reserved. | Disclaimer </div>
</div>
</body>
<!-- InstanceEnd --></html>
